<template>
  <el-dialog center width="30%" :visible="deactivateDialog" >
    <template #title>
      <el-row type="flex">
        <slot name="header"></slot>
      </el-row>
    </template>
    <el-row style="margin-top: -20px;margin-left: 20px" type="flex">
      <slot name="confan"></slot>
    </el-row>
    <el-row style="margin-top: 10px;font-size: 12px;margin-left: 20px" type="flex">
      <slot name="center"></slot>
    </el-row>
    <el-row style="margin-top: 20px;margin-left: 20px">
      <slot name="footer"></slot>
    </el-row>
    <el-row type="flex" justify="end">
      <el-button class="btn2" @click="change"><span>取消</span></el-button>
      <el-button class="btn1" @click="submit"><span>确定</span></el-button>
    </el-row>
  </el-dialog>
</template>

<script>
export default {
  name: 'DialogPage',
  props: {
    deactivateDialog: Boolean
  },
  methods: {
    submit () {
      this.$message.error('系统数据不允许修改')
      this.$emit('update:deactivateDialog', false)
      this.$parent.deactivateDialog = false
    },
    change () {
      this.$message.info('取消')
      this.$emit('update:deactivateDialog', false)
    }
  }
}
</script>

<style lang="scss" scoped>
.btn1{
      background-color: #E15536;
      color: #ffffff;
      height: 40px;
      width: 80px;
      border-radius: 5px;
}
.btn2{
      color: #2a2929;
      border: 1px solid #d8dde3;
      border-radius: 5px;
      height: 40px;
      width: 80px;
}
span{
  font-size: 14px;
}
</style>
